﻿<UserControl
    x:Class="Dynamics.NAV.Metro.Controls.Settings.ConnectionSettingsControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Dynamics.NAV.Metro.Controls.Settings"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Width="270"
    d:DesignHeight="600"
    d:DesignWidth="270">

    <Grid  Style="{StaticResource LayoutRootStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="130" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock  xml:space="preserve" TextAlignment="Left" TextWrapping="Wrap" FontSize="14.667" Style="{StaticResource SettingsHeaderTextStyle}">
            <TextBlock.Text>Enter the connection information for your Dynamics NAV OData source. (If changed, please restart application) 

Example : 
http://localhost:7048/DynamicsNAV70/OData/
            </TextBlock.Text>
        </TextBlock>
        <StackPanel Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <TextBlock Text="OData Base URL" Style="{StaticResource SettingsHeaderTextStyle}" />
            <TextBox x:Name="txtWebUrl" Text="http://localhost:7048/DynamicsNAV70/OData/" Margin="0,0,0,0" BorderThickness="1" BorderBrush="Gray" TextChanged="txtWebUrl_TextChanged" />
            <TextBlock Text="Username" Style="{StaticResource SettingsHeaderTextStyle}" />
            <TextBox x:Name="txtUsername" Margin="0,0,0,0" BorderThickness="1" BorderBrush="Gray" TextChanged="txtUsername_TextChanged" />
            <TextBlock Text="Password" Style="{StaticResource SettingsHeaderTextStyle}" />
            <PasswordBox x:Name="txtPassword" Margin="0,0,0,0" BorderThickness="1" BorderBrush="Gray" PasswordChanged="txtPassword_PasswordChanged" />
            <TextBlock Text="Max Records" Style="{StaticResource SettingsHeaderTextStyle}" />
            <TextBox x:Name="txtMaxRecords" Margin="0,0,0,0" BorderThickness="1" BorderBrush="Gray" TextChanged="txtMaxRecords_TextChanged" />
            <TextBlock Text="Records Per Page" Style="{StaticResource SettingsHeaderTextStyle}" />
            <TextBox x:Name="txtRecPerPage" Margin="0,0,0,0" BorderThickness="1" BorderBrush="Gray" TextChanged="txtRecPerPage_TextChanged" />
        </StackPanel>
    </Grid>
</UserControl>
